package com.tyqx.hashchaindao.mapper;

import com.tyqx.hashchainbean.module.Access;
import com.tyqx.hashchainbean.module.HashIndex;
import com.tyqx.hashchainbean.module.JZTAttachmentBusiness;
import com.tyqx.hashchainbean.module.NoHashValueJson;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface NoHashValueJsonMapper {

    public int insert(NoHashValueJson noHashValueJson);

    public int insertBatch(@Param("noHashValueJsonList") List<NoHashValueJson> noHashValueJsonList);

    public List<NoHashValueJson> select();

    public int deleteByHashValue(@Param("hashValue") String hashValue);

    public int deleteByRootHashValue(@Param("rootHashValue") String rootHashValue);

    public int updateCountByTableNameAndTableId(@Param("hashTableName") String hashTableName, @Param("hashTableId") Integer hashTableId, @Param("hashValue") String hashValue);


    public int updateStatus(@Param("status")Integer status, @Param("hashIndex")HashIndex hashIndex);

    public NoHashValueJson selectHashIndexByHashValue(String hashValue);

    public List<String> selectUserName(Integer status);

    public List<NoHashValueJson> selectByStatus(Integer status);


    public List<NoHashValueJson> selectByStatusBatch(@Param("status")Integer status,@Param("batchSize")Integer batchSize);


    public Integer selectCount(String userName);

    public List<NoHashValueJson> selectBatchGroupByUserName(@Param("userName")String userName,@Param("pageSize")Integer pageSize);


    public Integer updateBatchStatus(@Param("status")Integer status, @Param("hashIndex")HashIndex hashIndex,@Param("idList")List<Long> idList);

    public NoHashValueJson selectHashIndexById(Long id);


    public Integer deleteBatchByHashValue(@Param("hashValueList")List<String> hashValueList);
}